<template>
  <div>
   <div class="swiper">
      <van-swipe :autoplay="3000">
      <van-swipe-item v-for="(image, index) in swiper" :key="index">
        <img :src="image.picUrl" />
      </van-swipe-item>
    </van-swipe>
   </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      swiper:[]
    };
  },
  mounted() {
    this.$API.getBanner().then((rel)=>{
      // console.log(rel);
        this.swiper=rel.data.data
    }).catch(err=>{
      console.log(err);
    })
  },
};
</script>
<style lang="scss">
  .swiper{
    width: 100%;
    height: 12rem;
    img{
      width: 100%;
     height: 12rem;

    }
  }
</style>